﻿@{
    ViewBag.Title = "GiveAuthorization";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutCMS.cshtml";
}

@section htmlhead{
      <link href="~/Content/assets/css/Layout/css/main.css" rel="stylesheet" />
    <link href="~/Content/assets/css/plugin/validator.css" rel="stylesheet" />
    <link href="~/Content/assets/css/ztree/zTreeStyle.css" rel="stylesheet" />
    }
@model LY.Entity.S_Role
<div class="container">

     <div id="forms" class="mt10">
        <div class="box">
          <div class="box_border">
            <div class="box_top"><b class="pl15">权限管理</b></div>
            <div class="box_center">
              <form  id="frmEdit" method="post" action="@Url.Action("SaveRoleUser")" role="form" class="jqtransform">
                  <input id="hideId" name="ID" value="@Model.ID" type="hidden" />
                  <table class="form_table pt15 pb15" style="width: 100%;" border="0">
                      <tr>
                          <td class="td_right">角色：</td>
                          <td class="">@Model.Name</td>

                      </tr>
                      <tr>
                          <td class="td_right">权限：</td>
                          <td class="">
                              <div id="gridlist">
                          @{
                                var MList = ViewBag.MList;
                                //var blankstr = "　　";
                                for (int i = 0; i < MList.Count; i++)
                                {
                                    //for (int b =1; b < MList[i].Layer; b++)
                                    //{
                                    //    @blankstr
                                    //}
                                    if (MList[i].RoleID == 0)
                                    {
                                        <input name="nodesID" type="checkbox" value="@MList[i].ID"> @MList[i].UserName<br />
                                    }
                                    else
                                    {
                                        <input name="nodesID" type="checkbox" value="@MList[i].ID" checked="checked"> @MList[i].UserName<br />
                                    }
                                }
                          }
                      </div>
                          </td>
                      </tr>

                      <tr>
                          <td class="td_right"></td>
                          <td class=""></td>
                      </tr>
                      <tr>
                          <td class="td_center" colspan="5">
                              <input type="button" id="btnSave" name="button" style="margin-right: 50px;" class="btn btn82 btn_save2" value="保存">
                              <input type="button" id="btnReturn" name="button" class="btn btn82 btn_res" value="返回">
                          </td>
                      </tr>
                  </table>
               </form>
            </div>
          </div>
        </div>
     </div>
   </div>



 @section jssection{
    <script type="text/javascript">
        var util = {};
        var options = {
            listUrl: "@Url.Action("SetRoleUser")"
            @*,
            editUrl: "@Url.Action("MemberEdit")",
            deleteUrl: "@Url.Action("MemberDelete")",
            AuthenticateUrl: "@Url.Action("PwdEdit")",
            CertifiedmailUrl: "@Url.Action("SendMail")",
            assignUrl: "@Url.Action("DeptAssignPop")"*@

        };

        //$("#btnSave").click(function (e) {
        //    $("#frmEdit").submit();
        //});
    </script>

    @*<script src="~/assets/plugins/xjgrid/xjgrid.js"></script>*@
    @*<script src="~/assets/layer/layer.min.js"></script>*@
    <script src="~/Content/assets/plugins/validator/validator.js"></script>
    <script src="~/Content/assets/app/role/SetRoleUser.js"></script>

    @*<script src="~/assets/app/role/setrolemodule.js"></script>*@
}@* 
@section jssection{
    <script type="text/javascript"> 
    var util = {}; 
    var options = { 
        MenuTreeUrl: "@Url.Action("MenuTree")",
        RoleTreeUrl: "@Url.Action("RoleTree")"
    }; 

   </script>
     <script src="~/assets/plugins/validator/validator.js"></script>
    <script src="~/assets/js/common.js"></script>
    <script src="~/assets/app/role/SetRoleUser.js"></script>
    <script src="~/assets/app/role/SetRoleUserTree.js"></script>
    <script src="~/assets/DatePicker/WdatePicker.js"></script>
    <script src="~/assets/layer/layer.min.js"></script>
    <script src="~/assets/app/ztree/jquery.ztree.core-3.5.js"></script>
    <script src="~/assets/app/ztree/jquery.ztree.excheck-3.5.js"></script>
}*@